package com.jrx.anytxn.transaction.bean;

import com.jrx.anytxn.common.annotation.MethodType;
import com.jrx.anytxn.common.constant.CommonContants;
import com.jrx.anytxn.transaction.constant.TransBizConstant;
import com.jrx.anytxn.transaction.entity.*;
import org.apache.commons.collections.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * 利息累计job processor返回给writer的响应
 * @author  cbd
 *
 */
public class IntrAccuBean {

    private List<AmInterestAccrualInfo> interestAccrualInfoList = new ArrayList<>();

    private List<AmAccountMainInfo> accountMainInfoList = new ArrayList<>();

    private List<TlGlInterfaceInfo> tlGlInterfaceInfoList = new ArrayList<>();

    private List<TlInterestAccrualLog> tlInterestAccrualLogList = new ArrayList<>();

    private AmLoanAccountInfo amLoanAccountInfo;

    private List<TlTransactionInfo> transactionInfoList = new ArrayList<>();

    @MethodType(CommonContants.METHOD_TYPE_UPDATE)
    public List<AmInterestAccrualInfo> getInterestAccrualInfoList() {
        return interestAccrualInfoList;
    }

    public void setInterestAccrualInfoList(List<AmInterestAccrualInfo> interestAccrualInfoList) {
        this.interestAccrualInfoList = interestAccrualInfoList;
    }

    public void addInterestAccrualInfo(AmInterestAccrualInfo amInterestAccrualInfo){
        this.interestAccrualInfoList.add(amInterestAccrualInfo);
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<AmAccountMainInfo> getAccountMainInfoList() {
        return accountMainInfoList;
    }

    public void setAccountMainInfoList(List<AmAccountMainInfo> accountMainInfoList) {
        this.accountMainInfoList = accountMainInfoList;
    }

    public void addAccountMainInfo(AmAccountMainInfo amAccountMainInfo){
        this.accountMainInfoList.add(amAccountMainInfo);
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<TlGlInterfaceInfo> getTlGlInterfaceInfoList() {
        return tlGlInterfaceInfoList;
    }

    public void setTlGlInterfaceInfoList(List<TlGlInterfaceInfo> tlGlInterfaceInfoList) {
        this.tlGlInterfaceInfoList = tlGlInterfaceInfoList;
    }

    public void addTlGlInterfaceInfo(TlGlInterfaceInfo tlGlInterfaceInfo){
        if(null != tlGlInterfaceInfo) {
            this.tlGlInterfaceInfoList.add(tlGlInterfaceInfo);
        }
    }

    public void addTlGlInterfaceInfoList(List<TlGlInterfaceInfo> tlGlInterfaceInfoList){
        if(CollectionUtils.isNotEmpty(tlGlInterfaceInfoList)) {
            this.tlGlInterfaceInfoList.addAll(tlGlInterfaceInfoList);
        }
    }

    @MethodType(CommonContants.METHOD_TYPE_UPDATE)
    public AmLoanAccountInfo getAmLoanAccountInfo() {
        return amLoanAccountInfo;
    }

    public void setAmLoanAccountInfo(AmLoanAccountInfo amLoanAccountInfo) {
        this.amLoanAccountInfo = amLoanAccountInfo;
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<TlTransactionInfo> getTransactionInfoList() {
        return transactionInfoList;
    }

    public void setTransactionInfoList(List<TlTransactionInfo> transactionInfoList) {
        this.transactionInfoList = transactionInfoList;
    }

    public void addTlTransactionInfo(TlTransactionInfo tlTransactionInfo){
        this.transactionInfoList.add(tlTransactionInfo);
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<TlInterestAccrualLog> getTlInterestAccrualLogList() {
        return tlInterestAccrualLogList;
    }

    public void setTlInterestAccrualLogList(List<TlInterestAccrualLog> tlInterestAccrualLogList) {
        this.tlInterestAccrualLogList = tlInterestAccrualLogList;
    }

    public void addTlInterestAccrualLog(TlInterestAccrualLog tlInterestAccrualLog) {
        this.tlInterestAccrualLogList.add(tlInterestAccrualLog);
    }
}
